package com.yingside.collection.homework;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Test11 {
    public static void main(String[] args) {
        Student s1 = new Student("zs1",21,91);
        Student s2 = new Student("zs2",22,92);
        Student s3 = new Student("zs3",23,93);
        Student s4 = new Student("zs4",24,94);
        Student s5 = new Student("zs5",25,95);

        List<Student> c1 = new ArrayList<>();
        List<Student> c2 = new ArrayList<>();
        List<Student> c3 = new ArrayList<>();

        c1.add(s1);
        c1.add(s2);

        c2.add(s3);

        c3.add(s4);
        c3.add(s5);

        Map<String,List<Student>> map = new HashMap<>();

        map.put("人民学校",c1);
        map.put("成都学校",c2);
        map.put("四川学校",c3);

        List<Student> list = map.get("人民学校");

        for (Student s : list) {
            System.out.println("s = " + s);
        }

    }
}
